import React, { Component } from 'react';

class Tabbar extends Component {
  render() {
    return (
      <ul>
        {
          this.props.list.map((item)=>{
          return <li
          className={this.props.current ===item.id?"active":"" }
          onClick={this.props.change.bind(this,item.id)}
          key={item.id}>{item.name}</li>
          })
        }
      </ul>
    );
  }
}

export default Tabbar;